package org.lex.expression;


public class Operand implements Element {
	public static final Operand NA = new Operand(Double.NaN);

	private String image = "";
	private Number value = 0D;

	public Operand(String image) {
		this.image = image;
		this.value = Double.parseDouble(image);
	}

	public Operand(Number value) {
		this.image = value.toString();
		this.value = value.doubleValue();
	}

	public Number getValue() {
		return this.value;
	}

	public String getImage() {
		return image;
	}

	public boolean isOperand() {
		return true;
	}

	public boolean isOperator() {
		return false;
	}

	public String toString() {
		return this.getImage();
	}
}
